﻿using System;
using System.Collections.Generic;
using ArlesInterfaces.Render;

using System.Text;

namespace Arles.src.controller.Commands
{
    class TimeStepModeCommand : Command<IRender>
    {
        bool prevState;
        bool newState;

        public TimeStepModeCommand(IRender render, bool newState)
            : base(render,"RenderOptions")
        {
            this.newState = newState;   
        }

        public override void Execute()
        {
            prevState = receiver.FPSLimit;
            receiver.FPSLimit = newState;
        }

        public override void Undo()
        {
            receiver.FPSLimit = prevState;
        }

        public override string toString()
        {
            return newState.ToString();
        }
    }
}
